package com.mb.app.service.impl;


import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.mb.app.dao.TbOrderMapper;
import com.mb.app.domain.TbOrder;
import com.mb.app.domain.TbProductInfo;
import com.mb.app.service.ITbOrderService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单表  服务实现类
 * </p>
 *
 * @author liliping
 * @since 2019-04-15
 */
@Service
public class TbOrderServiceImpl extends ServiceImpl<TbOrderMapper, TbOrder> implements ITbOrderService {

    @Override
    public List<TbProductInfo> queryList(Map<String, Object> map) {
        List<TbProductInfo> list = this.baseMapper.lst(map);
        return list;
    }

    @Override
    public int count(Map<String, Object> map) {
        return this.baseMapper.countt(map);
    }

    @Override
    public List<TbProductInfo> getProducts(String orderId) {
        //订单下商品信息列表
        List<TbProductInfo> maps = this.baseMapper.getProducts(orderId);
        return maps;
    }

    @Override
    public TbOrder selectByIdAndShip(String orderId) {
        return this.baseMapper.selectByIdAndShip(orderId);
    }

    @Override
    public Map<String, Object> selectOrderItem(Map<String, Object> map) {
        return this.baseMapper.selectOrderItem(map);
    }

    @Override
    public int updateItem(Map<String, Object> map) {
        return this.baseMapper.updateItem(map);
    }


}
